package com.icart.entities;

import javax.persistence.*;
import java.sql.Date;
import java.sql.Timestamp;

@Entity
@Table(name = "wo_servbook", schema = "ams", catalog = "")
public class WoServbookEntity {
    private long bookseq;
    private Long custid;
    private Long custcarid;
    private String carno;
    private Long curkilo;
    private Date regdate;
    private String linkman;
    private String linktel;
    private Long busiid;
    private String remark;
    private Long chnid;
    private Date bookdate;
    private String booktime;
    private Long staffid;
    private Timestamp createtime;
    private Integer stat;
    private String bookcode;
    private Timestamp confirmtime;
    private Long confirmman;

    @Id
    @Column(name = "bookseq")
    public long getBookseq() {
        return bookseq;
    }

    public void setBookseq(long bookseq) {
        this.bookseq = bookseq;
    }

    @Basic
    @Column(name = "custid")
    public Long getCustid() {
        return custid;
    }

    public void setCustid(Long custid) {
        this.custid = custid;
    }

    @Basic
    @Column(name = "custcarid")
    public Long getCustcarid() {
        return custcarid;
    }

    public void setCustcarid(Long custcarid) {
        this.custcarid = custcarid;
    }

    @Basic
    @Column(name = "carno")
    public String getCarno() {
        return carno;
    }

    public void setCarno(String carno) {
        this.carno = carno;
    }

    @Basic
    @Column(name = "curkilo")
    public Long getCurkilo() {
        return curkilo;
    }

    public void setCurkilo(Long curkilo) {
        this.curkilo = curkilo;
    }

    @Basic
    @Column(name = "regdate")
    public Date getRegdate() {
        return regdate;
    }

    public void setRegdate(Date regdate) {
        this.regdate = regdate;
    }

    @Basic
    @Column(name = "linkman")
    public String getLinkman() {
        return linkman;
    }

    public void setLinkman(String linkman) {
        this.linkman = linkman;
    }

    @Basic
    @Column(name = "linktel")
    public String getLinktel() {
        return linktel;
    }

    public void setLinktel(String linktel) {
        this.linktel = linktel;
    }

    @Basic
    @Column(name = "busiid")
    public Long getBusiid() {
        return busiid;
    }

    public void setBusiid(Long busiid) {
        this.busiid = busiid;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "chnid")
    public Long getChnid() {
        return chnid;
    }

    public void setChnid(Long chnid) {
        this.chnid = chnid;
    }

    @Basic
    @Column(name = "bookdate")
    public Date getBookdate() {
        return bookdate;
    }

    public void setBookdate(Date bookdate) {
        this.bookdate = bookdate;
    }

    @Basic
    @Column(name = "booktime")
    public String getBooktime() {
        return booktime;
    }

    public void setBooktime(String booktime) {
        this.booktime = booktime;
    }

    @Basic
    @Column(name = "staffid")
    public Long getStaffid() {
        return staffid;
    }

    public void setStaffid(Long staffid) {
        this.staffid = staffid;
    }

    @Basic
    @Column(name = "createtime")
    public Timestamp getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Timestamp createtime) {
        this.createtime = createtime;
    }

    @Basic
    @Column(name = "stat")
    public Integer getStat() {
        return stat;
    }

    public void setStat(Integer stat) {
        this.stat = stat;
    }

    @Basic
    @Column(name = "bookcode")
    public String getBookcode() {
        return bookcode;
    }

    public void setBookcode(String bookcode) {
        this.bookcode = bookcode;
    }

    @Basic
    @Column(name = "confirmtime")
    public Timestamp getConfirmtime() {
        return confirmtime;
    }

    public void setConfirmtime(Timestamp confirmtime) {
        this.confirmtime = confirmtime;
    }

    @Basic
    @Column(name = "confirmman")
    public Long getConfirmman() {
        return confirmman;
    }

    public void setConfirmman(Long confirmman) {
        this.confirmman = confirmman;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WoServbookEntity that = (WoServbookEntity) o;

        if (bookseq != that.bookseq) return false;
        if (custid != null ? !custid.equals(that.custid) : that.custid != null) return false;
        if (custcarid != null ? !custcarid.equals(that.custcarid) : that.custcarid != null) return false;
        if (carno != null ? !carno.equals(that.carno) : that.carno != null) return false;
        if (curkilo != null ? !curkilo.equals(that.curkilo) : that.curkilo != null) return false;
        if (regdate != null ? !regdate.equals(that.regdate) : that.regdate != null) return false;
        if (linkman != null ? !linkman.equals(that.linkman) : that.linkman != null) return false;
        if (linktel != null ? !linktel.equals(that.linktel) : that.linktel != null) return false;
        if (busiid != null ? !busiid.equals(that.busiid) : that.busiid != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;
        if (chnid != null ? !chnid.equals(that.chnid) : that.chnid != null) return false;
        if (bookdate != null ? !bookdate.equals(that.bookdate) : that.bookdate != null) return false;
        if (booktime != null ? !booktime.equals(that.booktime) : that.booktime != null) return false;
        if (staffid != null ? !staffid.equals(that.staffid) : that.staffid != null) return false;
        if (createtime != null ? !createtime.equals(that.createtime) : that.createtime != null) return false;
        if (stat != null ? !stat.equals(that.stat) : that.stat != null) return false;
        if (bookcode != null ? !bookcode.equals(that.bookcode) : that.bookcode != null) return false;
        if (confirmtime != null ? !confirmtime.equals(that.confirmtime) : that.confirmtime != null) return false;
        if (confirmman != null ? !confirmman.equals(that.confirmman) : that.confirmman != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (bookseq ^ (bookseq >>> 32));
        result = 31 * result + (custid != null ? custid.hashCode() : 0);
        result = 31 * result + (custcarid != null ? custcarid.hashCode() : 0);
        result = 31 * result + (carno != null ? carno.hashCode() : 0);
        result = 31 * result + (curkilo != null ? curkilo.hashCode() : 0);
        result = 31 * result + (regdate != null ? regdate.hashCode() : 0);
        result = 31 * result + (linkman != null ? linkman.hashCode() : 0);
        result = 31 * result + (linktel != null ? linktel.hashCode() : 0);
        result = 31 * result + (busiid != null ? busiid.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (chnid != null ? chnid.hashCode() : 0);
        result = 31 * result + (bookdate != null ? bookdate.hashCode() : 0);
        result = 31 * result + (booktime != null ? booktime.hashCode() : 0);
        result = 31 * result + (staffid != null ? staffid.hashCode() : 0);
        result = 31 * result + (createtime != null ? createtime.hashCode() : 0);
        result = 31 * result + (stat != null ? stat.hashCode() : 0);
        result = 31 * result + (bookcode != null ? bookcode.hashCode() : 0);
        result = 31 * result + (confirmtime != null ? confirmtime.hashCode() : 0);
        result = 31 * result + (confirmman != null ? confirmman.hashCode() : 0);
        return result;
    }
}
